
function findAllCompany() {
    $.ajax({
        url: '/topAndFoot/company',
        data: '',
        type: 'get',
        dataType: 'json',
        success: function (data) {
            console.log(data.data, "454545455");
            setCompanyData(data.data);
        }
    })
}

function setCompanyData(data) {
    let adHtml = '';
    adHtml += ''+data.ad+'';
    $("#ad").html(adHtml);

    let footHtml = '';
    footHtml += '<div>地址：'+data.address+'</div>\n' +
        '                    <div>电话：'+data.phone+'</div>\n' +
        '                    <div>邮件：'+data.email+'</div>';
    $("#footCompany").html(footHtml);
    // console.log($("#footCompany").html());

    let footCompanyHtml = '';
    footCompanyHtml += '<div><img src="'+data.logo+'" height="60" width="60"/></div>\n' +
        '                <div>\n' +
        '                   '+data.advertisement+' ' +
        '                </div>';
    $("#footCompanyHtml").html(footCompanyHtml);
    // console.log($("#footCompanyHtml").html());
}